<template>
  <div class="HIS">
    <div class="aop sm-aop" style="position: fixed; z-index: 100" v-if="Token">
      <h1>医院不良(安全)事件智能报告系统</h1>
      <button
        class="btn btn-danger"
        style="float: right; height: 60%; margin: 8px"
      >
        <i class="fa fa-power-off z_red"></i>
      </button>
      <span style="float: right; height: 60%; margin: 8px; color: white"
        >当前用户：</span
      >
      <span style="float: right; height: 60%; margin: 8px; color: white"
        >所属机构：</span
      >
      <!-- <ul v-if="false">
        <li v-for="(item,index) in datalist" :key="index">
          <span @click="getdata(item)">
            <i class="glyphicon glyphicon-yen"></i>
            {{item.title}}
          </span>
        </li>
      </ul> -->
    </div>
    <div class="bottom">
      <div class="pucMenu menu" v-if="Token">
        <el-scrollbar v-for="(item, index) in menu" :key="item.id">
          <el-menu
            class="el-menu-vertical-demo"
            @open="handleOpen"
            @close="handleClose"
            :unique-opened="true"
            background-color="#545c64"
            text-color="#fff"
            active-text-color="#ffd04b"
          >
            <el-submenu :index="item.id">
              <template slot="title">
                <span>{{ item.title }}</span>
              </template>
              <el-tree
                :data="item.children"
                :props="defaultProps"
                @node-click="handleNodeClick"
              >
              </el-tree>
            </el-submenu>
          </el-menu>
        </el-scrollbar>
      </div>
      <div :class="Token ? 'context1' : 'context'">
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>

<script>
import menuData from "@/assets/menu.json";
export default {
  data() {
    return {
      Token: true,
      menu: menuData,
      defaultProps: {
        children: "children",
        label: "title",
      },
      childrenList: [],
    };
  },
  methods: {
    handleClose() {},
    handleOpen() {},
    handleNodeClick(data) {
      if (!data.children) {
        this.$router.push({
          path: "/" + data.name,
        });
      }
    },
  },
  mounted() {},
  created() {
    this.Token = this.$route.query.Token ? false : true;
    window.localStorage.setItem("loginInfor", this.$route.query.LoginInfor);
    window.localStorage.setItem("Token", this.$route.query.Token);
  },
};
</script>

<style lang="scss">
.z_red {
  color: white;
}

.menu {
  .custom-tree-node {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    padding-right: 8px;
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
      "Microsoft YaHei", "微软雅黑", Arial, sans-serif, Medium;
  }

  .custom-tree-nodefont {
    font-size: 16px;
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
      "Microsoft YaHei", "微软雅黑", Arial, sans-serif, Medium;
    /*width: 14rem!important;*/
    padding-left: 0.5rem !important;
    padding-right: 1rem !important;
    margin: 12px !important;
  }

  .el-tree-node.is-current > .el-tree-node__content > .custom-tree-nodefont {
    background-color: #0f74cc !important;
  }

  .el-tree-node.is-current > .el-tree-node__content {
    background-color: #0f74cc !important;
  }

  .el-tree-node__content:hover {
    background-color: #202c31 !important;
  }

  .el-tree-node__content {
    height: 38px !important;
  }
  .el-menu-item-group__title {
    display: none;
  }
}

.Outpatient {
  position: fixed;
  top: 0px;
  left: 0;
  right: 0;
}

.Outpatient .topLine {
  padding: 6px 15px 3px 15px;
  // background: url(./images/line0.png) repeat-x;
  background-size: contain;
  min-width: 1180px;
}

.Outpatient .topLine > div {
  height: 28px;
  margin-bottom: 3px;
}

.Outpatient .topLine .form-control {
  height: 28px;
  padding: 0 5px;
  float: left;
}

.Outpatient .topLine .btn {
  height: 28px;
  padding: 0 10px;
  float: left;
}

.Outpatient .topLine span {
  float: left;
  display: block;
  line-height: 26px;
  background: #f6f6f6;
  border: 1px solid #ccc;
  margin-right: -3px;
  position: relative;
  padding-left: 5px;
  z-index: 2;
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
}

.Outpatient .topLine b {
  float: left;
  display: block;
  line-height: 28px;
}

.Outpatient .topLine label {
  float: left;
  line-height: 28px;
}

.Outpatient .topLine .line1 p {
  float: left;
}

.Outpatient .topLine .line1 p:nth-child(2) {
  margin-left: 18px;
}

.Outpatient .topLine .line1 p:nth-child(2) input {
  margin-right: -1px;
}

.Outpatient .topLine .line1 p:nth-child(2) select {
  border-radius: 0;
  position: relative;
  margin-left: -2px;
  margin-right: -2px;
}

.Outpatient .topLine .line1 .btn {
  margin-left: 5px;
}

.Outpatient .topLine .line2 input {
  width: 1071px;
}

.Outpatient .topLine .line3 p {
  margin-right: 15px;
  float: left;
}

.Outpatient .topLine .line3 label {
  padding-right: 8px;
  background: #fff;
  height: 26px;
  padding-left: 8px;
  position: relative;
  top: 1px;
}

.Outpatient .topLine .line3 label input {
  position: relative;
  top: 1px;
  margin-right: 3px;
}

.Outpatient .oMain ul {
  height: 30px;
  line-height: 29px;
  margin: 3px 0 0 15px;
  position: relative;
  top: 1px;
  z-index: 2;
}

.Outpatient .oMain ul li {
  background: #eee;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  color: #666;
  float: left;
  padding: 0 15px;
  border-top: 1px solid #ddd;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
}

.Outpatient .oMain ul li.high {
  background: #fff;
  color: #333;
}

.Outpatient .oMain .clearfix {
  border: 1px solid #ddd;
  margin: 0 15px;
  position: fixed;
  left: 0;
  right: 20px;
  top: 182px;
  bottom: 40px;
}

.Outpatient .oneLt {
  width: 200px;
  float: left;
}

.Outpatient .oneLt dl {
  margin: 0;
}

.liclass {
  background: #e2f1fd !important;
}

.Outpatient .oneLt dt {
  background: #f6f6f6;
  height: 28px;
  line-height: 28px;
  margin: 5px;
  cursor: pointer;
  text-align: center;
}

.Outpatient .oneLt dd {
  padding: 2px 10px;
  max-height: 310px;
  overflow-y: auto;
  display: none;
  margin-right: 5px;
}

.ulclass {
  display: block !important;
}

@media screen and (min-height: 880px) {
  .Outpatient .oneLt dd {
    max-height: 480px;
  }
}

.Outpatient .oneLt dd p {
  line-height: 18px;
  margin-bottom: 5px;
}

.Outpatient .oneLt dd p:last-child {
  margin-bottom: 0;
}

.Outpatient .twoLt {
  width: 210px;
  float: left;
  margin-left: 5px;
}

.Outpatient .twoLt .form-control {
  height: 25px;
  padding: 0 5px;
}

.Outpatient .twoLt .btn {
  height: 26px;
  padding: 0 12px;
  position: relative;
  top: -2px;
}

.Outpatient .threeRt {
  position: absolute;
  right: 10px;
  left: 415px;
  top: 0;
  height: 100%;
}

.Outpatient .threeRt .Tb {
  position: absolute;
  right: 0;
  left: 0;
  border: 1px solid #ddd;
  bottom: 40px;
  top: 32px;
}

.Outpatient .threeRt .Tb + p {
  position: absolute;
  bottom: 10px;
  font-weight: bold;
}

.Outpatient .threeRt .Tb + p span {
  margin-right: 25px;
}

.Outpatient .threeRt .Tb + p b {
  font-weight: bold;
}

.Outpatient .threeRt table {
  border: none;
}

.Outpatient .threeRt table label {
  margin: 0;
  padding: 0 3px;
  cursor: pointer;
}

.Outpatient .threeRt table th,
.Outpatient .threeRt table td {
  padding: 4px 5px;
}

.Outpatient .threeRt table td:first-child {
  border-left: none;
}

.Outpatient .threeRt table td:last-child {
  border-right: none;
}

.Outpatient .threeRt .glyphicon-paperclip {
  color: blue;
  display: inline-block;
  padding: 3px 8px;
  cursor: pointer;
  width: 30px;
}

.Outpatient .cek {
  height: 32px;
  line-height: 32px;
  text-align: right;
}

.Outpatient .cek label {
  margin-left: 10px;
}

.Outpatient .cek input {
  position: relative;
  top: 1px;
  margin-right: 3px;
}

.Outpatient .rdo {
  position: absolute;
  height: 32px;
  line-height: 32px;
  top: 0;
  z-index: 2;
}

.Outpatient .rdo span {
  font-weight: bold;
}

.Outpatient .rdo input {
  position: relative;
  top: 1px;
  margin-right: 3px;
}

.Outpatient .rdo label {
  margin-left: 10px;
  cursor: pointer;
}

.Outpatient .twoLt .ultwoli {
  display: none;
}

.Outpatient .twoLt .form-group {
  padding-top: 32px;
}

.Outpatient .twoLt .form-group b {
  display: block;
  font-weight: bold;
}

.Outpatient .twoLt .form-group p {
  margin-bottom: 2px;
}

.Outpatient .twoLt .form-group span {
  display: inline-block;
  min-width: 42px;
}

.Outpatient .footLine {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 40px;
  background: #eee;
  width: 100%;
  padding: 4px 15px;
}

.Outpatient .btn-add {
  float: right;
  margin: 10px 13px 0 0;
}

/*弹框：动态信息*/
.dynamicBg .panel-default {
  width: 1000px;
  margin: 30px auto;
  background: #fff;
  border-radius: 5px;
  position: relative;
}

.dynamicBg .panel-default:after {
  content: "";
  width: 1px;
  height: 445px;
  background: #f5f5f5;
  position: absolute;
  left: 50%;
  top: 40px;
}

.dynamicBg .twoList > div {
  width: 50%;
  float: left;
  padding: 0 15px;
}

.dynamicBg .Tb {
  border: 1px solid #ddd;
  height: 406px;
  overflow-y: auto;
}

.dynamicBg .table {
  border: none;
}

.dynamicBg .table td:first-child {
  border-left: none;
}

.dynamicBg .table td:last-child {
  border-right: none;
}

.dynamicBg .table td,
.dynamicBg .table th {
  padding: 4px 5px;
}

.dynamicBg .p1 {
  margin: 5px 0;
}

.dynamicBg .p1 b {
  color: red;
  padding: 0 3px;
  font-weight: bold;
}

.dynamicBg .p1 .btn {
  padding: 0 12px;
  height: 28px;
  margin-left: 5px;
}

.dynamicBg .p1 input[type="text"] {
  padding: 0 5px;
  height: 28px;
  width: 135px;
  float: left;
}

.dynamicBg .p1 span {
  margin-right: 20px;
  float: left;
  line-height: 28px;
}

.dynamicBg .footBtn {
  height: 32px;
  margin: 8px 0 12px 0;
}

.dynamicBg .footBtn .btn:first-child {
  margin-right: 20px;
}

.dynamicBg .noData {
  text-align: center;
  color: red;
  padding: 13px 0;
  border: none;
}

/*侧边栏*/
.SideLine {
  position: fixed;
  top: 0px;
  bottom: 40px;
  right: 8px;
  background: #e6e6e6;
  width: 25px;
  text-align: center;
  cursor: pointer;
  border-bottom: 1px solid #ddd;
}

.divclassTFalse {
  display: none;
}

.SideLine p {
  position: absolute;
  top: 50%;
  margin-top: -55px;
  color: #666;
}

.Sidebar {
  background: rgba(0, 0, 0, 0.5);
  position: fixed;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  z-index: 99;
}

.Sidebar > div {
  width: 300px;
  background: #fff;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  padding: 0 10px;
}

.Sidebar .line1 {
  height: 32px;
  margin: 5px 0;
}

.Sidebar .Tb {
  border: 1px solid #ddd;
  height: 258px;
  overflow-y: auto;
}

.Sidebar .Tb table {
  border: none;
  margin: 0;
}

.Sidebar .Tb table td {
  padding: 4px 5px;
}

.Sidebar .Tb table tr:first-child td {
  border-top: none;
}

.Sidebar .Tb table td:first-child {
  border-left: none;
}

.Sidebar .Tb table td:last-child {
  border-right: none;
}

.Sidebar select {
  height: 28px;
  width: 160px;
}

.Sidebar .line2 {
  position: absolute;
  top: 300px;
  bottom: 0;
  right: 10px;
  width: 280px;
  overflow-y: auto;
  background: #e9f1ff;
  padding: 10px 5px 0 5px;
}

.Sidebar .line2 dl {
  clear: both;
}

.Sidebar .line2 dt {
  float: left;
  color: blue;
}

.Sidebar .line2 dd {
  float: right;
  width: 228px;
  margin-bottom: 5px;
}

.Sidebar .line3 {
  position: absolute;
  bottom: 0;
  right: 10px;
  width: 280px;
  height: 90px;
  display: none;
}

.Sidebar .line3 input[type="checkbox"] {
  position: relative;
  top: 2px;
  margin-right: 3px;
  margin-left: 50px;
}

.Sidebar .line3 input[type="text"] {
  width: 35px;
  height: 20px;
  background: #eee;
  border: 1px solid #bbb;
}

.Sidebar .line3 p:nth-child(2) {
  margin: 7px 0 3px 0;
}

.Sidebar .arrow_1 {
  right: 300px;
  z-index: 3;
  position: fixed;
  top: 50%;
  height: 110px;
  width: 32px;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  color: #888;
  line-height: 18px;
  background: rgba(243, 243, 243, 0.8);
  margin-top: -55px;
  cursor: pointer;
  padding: 10px;
}

/*弹框 检验报告样式*/
.yanReport .panel-default {
  width: 1000px;
  margin: 30px auto;
  background: #fff;
  position: relative;
  border-radius: 5px;
}

.Report {
  height: 510px;
}

.Report .form-group {
  margin: 0;
  padding: 5px 0;
}

.Report .form-group p:first-child {
  margin-left: 15px;
}

.Report .oneBox p .btn {
  margin-right: 5px !important;
}

.importBox .Tb .table {
  border: none;
}

.importBox .table th,
.importBox .table td {
  padding: 4px 5px;
}

.importBox .Tb .table td:first-child {
  border-left: none;
}

.importBox .Tb .table td:last-child {
  border-right: none;
}

.yanReport .Report .speed {
  clear: both;
  padding: 5px 15px 0 15px;
}

.yanReport .Report .speed div {
  margin: -22px 0 6px 75px;
  height: 16px;
  background: #f3f3f3;
  border-radius: 15px;
  overflow: hidden;
}

.yanReport .Report .speed div span {
  display: inline-block;
  background: #67e467;
  height: 16px;
}

.yanReport .Report .blue {
  color: blue;
}

.yanReport .Report .red {
  color: red;
}

.yanReport .Report .pucType2 .form-control {
  padding: 0 5px;
  width: 120px;
}

.yanReport .Report .pucType2 p {
  margin-left: 13px;
}

.yanReport .Report .oneBox p {
  margin-right: 0 !important;
}

.yanReport .Report .oneBox p .btn {
  margin-right: 5px !important;
}

.yanReport .importBox .Tb {
  position: absolute;
  top: 130px;
  width: 400px;
  bottom: 10px;
  left: 15px;
  border: 1px solid #ddd;
  overflow-y: auto;
}

.yanReport .importBox .Main {
  position: absolute;
  top: 130px;
  bottom: 10px;
  left: 425px;
  right: 15px;
  border: 1px solid #ddd;
  overflow-y: auto;
  background: #f8f8f8;
  padding: 0 15px;
}

.yanReport .importBox .Main .line1 {
  padding: 10px 0 20px 0;
  text-align: right;
  width: 100%;
}

.yanReport .importBox .Main .line1 .btn {
  margin-left: 10px;
}

.yanReport .importBox .Main div {
  clear: both;
}

.yanReport .importBox .Main div p:nth-child(2) {
  margin-left: 30px;
}

.yanReport .importBox .Main .line2 p {
  float: left;
}

.yanReport .importBox .Main .line3 {
  padding-top: 8px;
}

.yanReport .importBox .Main .line3 p:first-child {
  margin-bottom: 8px;
}

.yanReport .importBox .Main textarea {
  resize: none;
  height: 100px;
}

.yanReport .importBox .Main .area {
  padding-top: 8px;
  padding-left: 74px;
  margin-bottom: -5px;
}

.yanReport .importBox .Main .area label {
  vertical-align: top;
  margin-left: -74px;
  padding-top: 5px;
}

/*弹框 模板*/
.Template .panel-default {
  width: 1000px;
  margin: 30px auto;
  background: #fff;
  position: relative;
  border-radius: 5px;
}

.Template .peel label {
  background: none !important;
  border: none !important;
  cursor: pointer;
  margin-right: 10px !important;
}

.Template .peel label input {
  position: relative;
  top: 1px;
  margin-right: 3px;
}

.Template .Report .rt .btn {
  float: right;
  margin: 0 0 0 10px;
}

.Template .importBox .Tb {
  position: absolute;
  top: 95px;
  width: 240px;
  bottom: 10px;
  left: 15px;
  border: 1px solid #ddd;
  overflow: auto;
}

.Template .importBox .Tb2 input[type="checkbox"] {
  position: relative;
  top: 1px;
  margin-right: 3px;
}

.Template .importBox .Main {
  position: absolute;
  top: 95px;
  bottom: 10px;
  left: 270px;
  right: 15px;
  overflow-y: auto;
}

.Template .importBox .h6 {
  font-size: 15px;
  margin: 0;
  height: 30px;
  color: #0092ff;
  line-height: 26px;
}

.bottom {
  width: 100%;
  display: flex;
  justify-content: space-around;

  .pucMenu {
    position: fixed;
    top: 40px;
    left: 0;
    bottom: 0;
    padding-top: 8px;
    z-index: 2;
    background: #363942;
    width: 200px;
    overflow-y: auto;

    .el-tree {
      background: transparent;
      color: #ccc;
    }
  }

  .pucMenu::-webkit-scrollbar,
  .pucMenu::-moz-scrollbar {
    display: none;
  }

  .pucMenu dl {
    color: #fff;
    margin: 0;
    cursor: pointer;
    margin-bottom: 1px;
  }

  .pucMenu dl dt {
    line-height: 36px;
    padding-left: 5px;
    color: #ddd;
    background: #494f5a;
  }

  .pucMenu dl dt b {
    font-size: 18px;
    float: right;
    line-height: 36px;
    padding-right: 10px;
  }

  .pucMenu dl .high {
    background: #ecf4ff !important;
    color: #333;
  }

  .lefthidden {
    display: none;
  }

  .pucMenu dl .force {
    background: #494f5a !important;
    color: #ddd !important;
  }

  .pucMenu dl i {
    font-size: 16px;
    margin: 0 11px 0 1px;
    display: inline-block;
    width: 13px;
  }

  .pucMenu dl dd:hover {
    background: #3a5876;
  }

  .pucMenu dl dd {
    line-height: 32px;
    padding-left: 15px;
    color: #ddd;
    display: none;
  }

  .pucMenu dl:first-child dd {
    display: block;
  }

  .IfGuahao {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border: none;
    padding-left: 170px;
  }

  .arrow {
    left: 153px;
    z-index: 3;
    position: fixed;
    top: 50%;
    height: 34px;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    background: #d0ebff;
    margin-top: -20px;
    cursor: pointer;
    font-family: cursive;
    font-weight: bold;
    padding: 8px 5px;
    box-shadow: 1px 1px 5px #abb4bb;
  }

  .arrow2 {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    background: #5b6779;
    color: #fff;
  }

  .context1 {
    position: absolute;
    right: 0;
    top: 46px;
    bottom: 0;
    left: 200px;
    z-index: 99;
  }
  .context {
    position: absolute;
    right: 0;
    top: 0px;
    bottom: 0;
    left: 0px;
    z-index: 99;
  }
}
</style>